{extend name="base" /}
{block name="body"}
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class=""><a href="{:url('admin/StoreTruck/index')}">信息管理</a></li>
            <li class=""><a href="{:url('admin/StoreTruck/add')}">添加信息</a></li>
            <li class=""><a href="{:url('admin/StoreTruck/edit',['id'=>$storetruck['id']])}">编辑信息</a></li>
            <li class="layui-this">查看信息</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
            <form class="layui-form form-container" action="{:url('admin/StoreTruck/update')}" method="post">
                    <div class="layui-form-item">
                        <label class="layui-form-label">标题</label>
                        <div class="layui-input-block">
                            <input type="text" name="title" value="{$storetruck.title}" required  lay-verify="required" placeholder="请输入标题" class="layui-input" disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">车型</label>
                        <div class="layui-input-block">
                            <select name="type" lay-verify="required" disabled>
                                {foreach name="store_list" item="vo"}
                                {if $vo.pid == 3}
                                <option value="{$vo.id}" {if $vo.id eq $storetruck.type}selected="selected"{/if}>{$vo.name}</option>
                                {/if}
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">品牌</label>
                        <div class="layui-input-block">
                            <select name="brand" lay-verify="required"  disabled>
                                {foreach name="store_list" item="vo"}
                                {if $vo.pid == 1}
                                <option value="{$vo.id}" {if $vo.id eq $storetruck.brand}selected="selected"{/if}>{$vo.name}</option>
                                {/if}
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">驱动</label>
                        <div class="layui-input-block">
                            <select name="drive" lay-verify="required"  disabled>
                                {foreach name="store_list" item="vo"}
                                {if $vo.pid == 4}
                                <option value="{$vo.id}" {if $vo.id eq $storetruck.drive}selected="selected"{/if}>{$vo.name}</option>
                                {/if}
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">马力</label>
                        <div class="layui-input-block">
                            <input type="text" name="soup" value="{$storetruck.soup}" required  lay-verify="required" placeholder="请输入马力" class="layui-input" disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">颜色</label>
                        <div class="layui-input-block">
                            <input type="text" name="color" value="{$storetruck.color}" required  lay-verify="required" placeholder="请输入颜色" class="layui-input" disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">提车城市</label>
                        <div class="layui-input-inline">
                            <select name="site[]" lay-verify="required" id="site" disabled>
                                <option value="0">全国</option>
                                {foreach name="area_list" item="vo"}
                                {if $vo.parent_id == 0}
                                <option value="{$vo.id}" {if $storetruck.site[0] == $vo.id}selected="selected"{/if}>{$vo.name}</option>
                                {/if}
                                {/foreach}
                            </select>
                        </div>
                        <div class="layui-input-inline">
                            <select name="site[]" lay-verify="required" id="site_son" disabled>
                                <option value="0">全省</option>
                                {foreach name="area_list" item="vo"}
                                {if $vo.parent_id == $storetruck.site[0]}
                                <option value="{$vo.id}" {if $storetruck.site[1] == $vo.id}selected="selected"{/if}>{$vo.name}</option>
                                {/if}
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">上牌地区</label>
                        <div class="layui-input-inline">
                            <select name="apply_site[]" lay-verify="required" id="apply" disabled>
                                <option value="0">全国</option>
                                {foreach name="area_list" item="vo"}
                                {if $vo.parent_id == 0}
                                <option value="{$vo.id}" {if $storetruck.apply_site[0] == $vo.id}selected="selected"{/if}>{$vo.name}</option>
                                {/if}
                                {/foreach}
                            </select>
                        </div>
                        <div class="layui-input-inline">
                            <select name="apply_site[]" lay-verify="required" id="apply_son" disabled>
                                <option value="0">全省</option>
                                {foreach name="area_list" item="vo"}
                                {if $vo.parent_id == $storetruck.apply_site[0]}
                                <option value="{$vo.id}" {if $storetruck.apply_site[1] == $vo.id}selected="selected"{/if}>{$vo.name}</option>
                                {/if}
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">燃料种类</label>
                        <div class="layui-input-block">
                            <input type="text" name="classify" value="{$storetruck.classify}" placeholder="请输入内容" class="layui-input" disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">排放标准</label>
                        <div class="layui-input-block">
                            <input type="text" name="let" value="{$storetruck.let}" placeholder="请输入内容" class="layui-input" disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">指导价(万)</label>
                        <div class="layui-input-block">
                            <input type="text" name="direct_price" value="{$storetruck.direct_price}" placeholder="请输入内容" class="layui-input" disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">价格(万)</label>
                        <div class="layui-input-block">
                            <input type="text" name="price" value="{$storetruck.price}" placeholder="请输入价格" class="layui-input" disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">降价金额(万)</label>
                        <div class="layui-input-block">
                            <input type="text" name="low_price" value="{$storetruck.low_price}" placeholder="(选填)请输入降价金额" class="layui-input" disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">商品详情</label>
                        <div class="layui-input-block">
                            <textarea name="content" placeholder="请输入商品详情" class="layui-textarea" id="content" disabled>{$storetruck.content}</textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">参数配置</label>
                        <div class="layui-input-block">
                            <textarea name="peizhi" placeholder="请输入参数配置" class="layui-textarea" id="content" disabled>{$storetruck.peizhi}</textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">图集</label>
                        <div class="layui-input-block">
                            <button type="button" id="upload-photo-btn" class="layui-btn" disabled>上传图集</button>
                            <div id="photo-container">
                                {if condition="!empty($storetruck['photo'])"}
                                {foreach name="$storetruck['photo']" item="vo"}
                                <div class="photo-list">
                                    <input type="text" name="photo[]" value="{$vo}" class="layui-input layui-input-inline" disabled>
                                    <button type="button" class="layui-btn layui-btn-danger remove-photo-btn" disabled>移除</button>
                                </div>
                                {/foreach}
                                {/if}
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">查看次数</label>
                        <div class="layui-input-block">
                            <input type="text" name="reading" value="{$storetruck.reading}" class="layui-input" disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">新车到店</label>
                        <div class="layui-input-block">
                            <input type="radio" name="new_truck" value="1" title="是" {if $storetruck.new_truck == 1}checked="checked"{/if} disabled>
                            <input type="radio" name="new_truck" value="0" title="否" {if $storetruck.new_truck == 0}checked="checked"{/if} disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">置顶</label>
                        <div class="layui-input-block">
                            <input type="radio" name="is_top" value="1" title="置顶" {if $storetruck.is_top == 1}checked="checked"{/if} disabled>
                            <input type="radio" name="is_top" value="0" title="未置顶" {if $storetruck.is_top == 0}checked="checked"{/if} disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">推荐</label>
                        <div class="layui-input-block">
                            <input type="radio" name="is_recommend" value="1" title="推荐" {if $storetruck.is_recommend == 1}checked="checked"{/if} disabled>
                            <input type="radio" name="is_recommend" value="0" title="未推荐" {if $storetruck.is_recommend == 0}checked="checked"{/if} disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">状态</label>
                        <div class="layui-input-block">
                            <input type="radio" name="status" value="1" title="已审核" {if $storetruck.status == 1}checked="checked"{/if} disabled>
                            <input type="radio" name="status" value="0" title="未审核" {if $storetruck.status == 0}checked="checked"{/if} disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <a href="{:url('admin/StoreTruck/index')}" class="layui-btn layui-btn-normal">返回</a>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{/block}